#include <stdio.h>

int main(int argc, char *argv[])
{
	unsigned long n, cnt = 1, base = 7, mcnt = 1, pcnt=0, mre, pre, re;
	char s[8];
	scanf("%s", s);
	n = atol(s);

	while (cnt <= n) {
		mre = base * mcnt;
		pre = pcnt * 10 + base;
		if (mre > pre) {
			re = pre;
			pcnt++;
		} else if (mre < pre) {
			re = mre;
			mcnt++;
		} else {
			re = mre;
			mcnt++;
			pcnt++;
		}
		printf("%ld\n", re);
		cnt++;
	}

	return 0;
}
